using Microsoft.EntityFrameworkCore;
using Admin3000.Backend.Api.Entity;



namespace Admin3000.Backend.Api.Database
{
    /// <summary>
    /// 数据库上下文 这里定义这些实体对应的数据表 及连接参数
    /// </summary>
    public class Admin3000Db : DbContext
    {
        public Admin3000Db(DbContextOptions options) : base(options)
        {

        }
        public DbSet<Users> User { get; set; }
        public DbSet<Roles> Roles { get; set; }
        public DbSet<UserRoles> UserRoles { get; set; }
        public DbSet<AuditInfo> AuditInfo { get; set; }

        protected override void OnConfiguring(DbContextOptionsBuilder options)
        {
            options.UseSqlServer(@"server=.;database=Admin3000;uid=sa;pwd=123456");
        }
    }
}
